package LogBook;

public class RST {
	private String rst;

	public RST() {
		this.rst = "";
	}

	public RST(String rst) {
		this.rst = rst;
	}

	public String standard(String mode) {
		if (mode == "USB" || mode == "LSB")
			return "59/59";
		else
			return "599/599";
	}

	public String sent(){
		int index = rst.indexOf("/");
		return rst.substring(0, index);
	}
	
	public String rec(){
		int index = rst.indexOf("/");
		return rst.substring(index);
	}
	
	public String getRST(){
		return this.rst;
	}
	
	public String getRST(String flag){
		if (flag == "s")
			return this.sent();
		if (flag == "r")
			return this.rec();
		
		return this.getRST();
	}
}

